import type { R, TableDataInfo } from '@/api/model/resultModel';
import type { XhljActivityAgendaForm, XhljActivityAgendaQuery, XhljActivityAgendaVo } from '@/api/xhlj/model/activityAgendaModel';
import { request } from '@/utils/request';

// 查询活动议程列表
export function listActivityAgenda(query?: XhljActivityAgendaQuery) {
  return request.get<TableDataInfo<XhljActivityAgendaVo>>({
    url: '/xhlj/activityAgenda/list',
    params: query,
  });
}

// 查询活动议程详细
export function getActivityAgenda(activityAgendaId: number) {
  return request.get<R<XhljActivityAgendaVo>>({
    url: `/xhlj/activityAgenda/${activityAgendaId}`,
  });
}

// 新增活动议程
export function addActivityAgenda(data: XhljActivityAgendaForm) {
  return request.post<R<void>>({
    url: '/xhlj/activityAgenda',
    data,
  });
}

// 修改活动议程
export function updateActivityAgenda(data: XhljActivityAgendaForm) {
  return request.put<R<void>>({
    url: '/xhlj/activityAgenda',
    data,
  });
}

// 删除活动议程
export function delActivityAgenda(activityAgendaIds: number | Array<number>) {
  return request.delete<R<void>>({
    url: `/xhlj/activityAgenda/${activityAgendaIds}`,
  });
}
